package test3;

public class TestMain {
    public static void main(String[] args) {
        String str = "snjnd.exe";

        String[] s1 = str.split("\\.");

        if(s1[s1.length-1].equals("exe")){
            System.out.println("扩展名为exe");
        }else {
            System.out.println("扩展名不是exe");
        }
    }
}
